package com.sinoair.service.impl;

import com.sinoair.domain.User;
import com.sinoair.repository.UserRepository;
import com.sinoair.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {


    @Resource
    private UserRepository userRepository;

    @Override
    public User findByUsername(String username) {
        return userRepository.findByUsername(username);
    }

    @Override
    public User login(String name, String password) {
        return null;
    }

    @Override
    public User save(User user) {
        User newUser = userRepository.save(user);
        return newUser;
    }
}
